#ifndef _SOFT_PWM_H_
#define _SOFT_PWM_H_

#include "Global.h"

typedef struct 
{
    uint8 Step;
    uint8 Duty[6];
} Typedef_PWM;

#define P_PWM1          RB2
#define P_PWM2          RB3
#define P_PWM3          RB4
#define P_PWM4          RB5
#define P_PWM5          RB6
#define P_PWM6          RB7

#define MAX_PWM_STEP   100

extern volatile Typedef_PWM PWM_Ctrl;
extern uint8 DestPwmDuty[6];
extern uint8 CntUpdateTm,TmPwmChange;

void initSoftPWM(void);
void SoftPwmCore(void);
void SoftPwm_UpdateDuty(void);

#endif